Load libraries

library(STutility)
library(ggplot2)
library(ggpubr)
library(dplyr)
library(magrittr)

Assemble spaceranger output files and merge curated meta data

# Mouse brain
samples <- Sys.glob(paths = "../../spaceranger_output/lung/*/filtered_feature_bc_matrix.h5")
imgs <- Sys.glob(paths = "../../spaceranger_output/lung/*/spatial/tissue_hires_image.png")
spotfiles <- Sys.glob(paths = "../../spaceranger_output/lung/*/spatial/tissue_positions_list.csv")
json <- Sys.glob(paths = "../../spaceranger_output/lung/*/spatial/scalefactors_json.json")

infoTable <- data.frame(samples, imgs, spotfiles, json)
infoTable <- cbind(infoTable, arrayID = do.call(rbind, strsplit(infoTable$samples, "/"))[, 5])

curated_metadata <- openxlsx::read.xlsx("../../sheets/curated_RNA_rescue_sample_metadata.xlsx", sheet = 3)
curated_metadata <- setNames(curated_metadata, nm = c("storage_time", "seq_date", "include", "RNA_rescue",
                                                       "project", "experimenter", "processer", "comments",
                                                       "ID", "paper_id", "RIN", "DV200", "protocol", "source", "arrayID", "spots_under_tissue",
                                                       "genes_detected", "fraction_spots_under_tissue",
                                                       "median_genes_per_spot", "median_UMIs_per_spot", 
                                                       "saturation", "reads_mapped_to_probe_set",
                                                       "reads_mapped_confidently_to_probe_set",
                                                       "reads_mapped_confidently_to_filtered_probe_set",
                                                       "reads_mapped_to_genome",
                                                       "reads_mapped_confidently_to_genome",
                                                       "number_of_panel_genes"))

infoTable <- merge(infoTable, curated_metadata, by = "arrayID")

Load data into a Seurat object

LNG <- InputFromTable(infoTable[c(1, 3:4, 2, 5:6), ])
## Using spotfiles to remove spots outside of tissue
## Loading ../../spaceranger_output/lung/V10B01-037_A1/filtered_feature_bc_matrix.h5 count matrix from a 'Visium' experiment
## Loading ../../spaceranger_output/lung/V10T03-286_B1/filtered_feature_bc_matrix.h5 count matrix from a 'Visium' experiment
## Loading ../../spaceranger_output/lung/V10T03-286_D1/filtered_feature_bc_matrix.h5 count matrix from a 'Visium' experiment
## Loading ../../spaceranger_output/lung/V10B01-037_B1/filtered_feature_bc_matrix.h5 count matrix from a 'Visium' experiment
## Loading ../../spaceranger_output/lung/V11A20-384_C1/filtered_feature_bc_matrix.h5 count matrix from a 'Visium' experiment
## Loading ../../spaceranger_output/lung/V11A20-384_D1/filtered_feature_bc_matrix.h5 count matrix from a 'Visium' experiment
## 
## ------------- Filtering (not including images based filtering) -------------- 
##   Spots removed:  0  
##   Genes removed:  12771  
## Saving capture area ranges to Staffli object 
## After filtering the dimensions of the experiment is: [23830 genes, 11484 spots]

Load images

LNG <- LoadImages(LNG, time.resolve = FALSE, xdim = 1e3)
## Loading images for 6 samples: 
##   Reading ../../spaceranger_output/lung/V10B01-037_A1/spatial/tissue_hires_image.png for sample 1 ... 
##   Scaling down sample 1 image from 1979x2000 pixels to 1000x1011 pixels 
##   Reading ../../spaceranger_output/lung/V10T03-286_B1/spatial/tissue_hires_image.png for sample 1 ... 
##   Scaling down sample 2 image from 2000x1916 pixels to 1000x958 pixels 
##   Reading ../../spaceranger_output/lung/V10T03-286_D1/spatial/tissue_hires_image.png for sample 1 ... 
##   Scaling down sample 3 image from 2000x1916 pixels to 1000x958 pixels 
##   Reading ../../spaceranger_output/lung/V10B01-037_B1/spatial/tissue_hires_image.png for sample 1 ... 
##   Scaling down sample 4 image from 1979x2000 pixels to 1000x1011 pixels 
##   Reading ../../spaceranger_output/lung/V11A20-384_C1/spatial/tissue_hires_image.png for sample 1 ... 
##   Scaling down sample 5 image from 1936x2000 pixels to 1000x1033 pixels 
##   Reading ../../spaceranger_output/lung/V11A20-384_D1/spatial/tissue_hires_image.png for sample 1 ... 
##   Scaling down sample 6 image from 1979x2000 pixels to 1000x1011 pixels

Apply rigid transformations, e.g. rotations to get a rough alignment of the H&E images

# Warp transform
LNG <- WarpImages(LNG, verbose = TRUE, transforms = list( "2" = list(angle = -90), 
                                                          "3" = list(angle = -90), 
                                                          "5" = list(angle = 180)))
## Creating dummy masks ...Loading masked image for sample 2 ... 
## Warping pixel coordinates for 2 ... 
## Warping image for 2 ... 
## Warping image mask for 2 ... 
## Finished alignment for sample2 
## 
## Loading masked image for sample 3 ... 
## Warping pixel coordinates for 3 ... 
## Warping image for 3 ... 
## Warping image mask for 3 ... 
## Finished alignment for sample3 
## 
## Loading masked image for sample 5 ... 
## Warping pixel coordinates for 5 ... 
## Warping image for 5 ... 
## Warping image mask for 5 ... 
## Finished alignment for sample5

Add a new metadata column with a combined protocol and lung ID label

LNG$paper_id <- LNG[[]] %>%
  mutate(paper_id = ifelse(paper_id == "1.0", "LNG1", "LNG2")) %>% 
  pull(paper_id)
LNG$protocol_lng <- gsub(pattern = " ", replacement = "_", paste0(LNG$protocol, "_ID: ", LNG$paper_id))
ST.FeaturePlot(LNG, features = "nFeature_RNA", ncol = 3, label.by = "protocol_lng")
## Loading required namespace: viridis

QC


The standard Visium data sets have reduced numbers of unique genes compared to the data generated by RRST.

VlnPlot(LNG, features = "nFeature_RNA", group.by = "arrayID", split.by = "protocol")
## The default behaviour of split.by has changed.
## Separate violin plots are now plotted side-by-side.
## To restore the old behaviour of a single split violin,
## set split.plot = TRUE.
##       
## This message will be shown once per session.

At a first glance, we can see that the distribution of unique genes is quite different across the two protocols. For RRST, we have much more even coverage across the tissue, whereas in the standard Visium data, we only get high counts in the epithelium.

A reasonable threshold for filtering would be somewhere between 300-1000 unique genes, depending on the tissue type. If parts of the tissue is cell sparse, which is the case for the alveoli, it might be more reasonable to set a lower threshold.

If we use a threshold of 300 unique genes, we can see that ~1.3%-2.3% of spots are discarded from the RR-seq data, whereas ~21%-80% of spots are discarded from the standard Visium data.

Suppl. Figure - histograms (filters) for lung Visium data


LNG[[]] %>% 
  dplyr::mutate(filter = ifelse(nFeature_RNA < 300, "discard", "keep")) %>%
  dplyr::group_by(protocol, paper_id, filter) %>%
  dplyr::summarize(Freq = n()) %>%
  dplyr::group_by(protocol, paper_id) %>%
  dplyr::mutate(percentage_discarded = round(Freq/sum(Freq)*100, digits = 2)) %>%
  dplyr::filter(filter == "discard") %>%
  dplyr::select(-Freq, -filter) %>%
  dplyr::arrange(paper_id)
## `summarise()` has grouped output by 'protocol', 'paper_id'. You can override
## using the `.groups` argument.
## # A tibble: 4 × 3
## # Groups:   protocol, paper_id [4]
##   protocol   paper_id percentage_discarded
##   <chr>      <chr>                   <dbl>
## 1 RNA rescue LNG1                     1.3 
## 2 standard   LNG1                    21.4 
## 3 RNA rescue LNG2                     2.29
## 4 standard   LNG2                    79.8
p <- LNG[[]] %>% ggplot(aes(nFeature_RNA, fill = ifelse(nFeature_RNA < 300, "discard", "keep"))) +
  geom_histogram(binwidth = 100) +
  geom_vline(xintercept = 300, linetype = "longdash") +
  facet_grid(protocol~ID, scales = "free", 
             labeller = labeller(protocol = c("RNA rescue" = "RRST", "standard" = "standard"), 
                                 ID = c("P583-B-LNG3" = "LNG1", "P640-C-LNG5" = "LNG2"))) +
  labs(fill = "", x = "Unique genes", y = "Count") +
  scale_x_continuous(breaks = c(0, 300, 2000, 4000, 6000), minor_breaks = NULL) +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 60, hjust = 1), 
        axis.text = element_text(size = 10, colour = "black"),
        axis.title = element_text(size = 14, colour = "black"),
        strip.text = element_text(size = 14, colour = "black", face = "bold"),
        legend.text = element_text(size = 10, colour = "black"))

p

pdf(file = "../Suppl_figures/Suppl_Figure_filter_lung_data/Suppl_Figure_2.pdf", width = 10, height = 7)
print(p)
dev.off()

png(filename = "../Suppl_figures/Suppl_Figure_filter_lung_data/Suppl_Figure_2.png", width = 2400, height = 1600, res = 300)
print(p)
dev.off()

Filter data


LNG$filter <- ifelse(LNG$nFeature_RNA < 300, "discard", "keep")
LNG.subset <- SubsetSTData(LNG, expression = nFeature_RNA > 300)

Now we can see that quite a few spots have been discarded, in particular for the standard Visium data for LNG2.

ST.FeaturePlot(LNG.subset, features = "nFeature_RNA", ncol = 3, label.by = "protocol_lng") &
  theme(panel.background = element_rect(fill = "lightgrey"))

Split data by protocol and sample

LNGList <- lapply(unique(LNG.subset$protocol_lng), function(i) {
  SubsetSTData(LNG.subset, expression = protocol_lng == i)
})

Analysis


  1. log-normalize data
  2. scale data (z-transformation)
  3. find top variable features
  4. run dimensionality reduction using Principal Component Analysis (PCA)
  5. Create an SNN graph using the first 20 PCs as input
  6. Find clusters using Louvain algorithm
  7. Create a UMAP using the first 20 PCs as input
LNGList <- lapply(LNGList, function(LNG.subset) {
  LNG.subset <- LNG.subset %>%
    NormalizeData() %>%
    ScaleData() %>%
    FindVariableFeatures() %>%
    RunPCA() %>%
    FindNeighbors(reduction = "pca", dims = 1:20) %>%
    FindClusters(resolution = 0.8) %>%
    RunUMAP(reduction = "pca", dims = 1:20, min.dist = 0.3, n.epochs = 1e3)
})
LNGList <- setNames(LNGList, nm = unique(LNG$protocol_lng))

Plot clusters in UMAP embedding

DimPlot(LNGList[[1]]) & ggtitle("LNG1 - RRST") | DimPlot(LNGList[[2]]) & ggtitle("LNG1 - standard")

DimPlot(LNGList[[3]]) & ggtitle("LNG2 - RRST") | DimPlot(LNGList[[4]]) & ggtitle("LNG2 - standard")

DEA


Run DEA with an avg_log2FC threshold of 0.5 and adjusted p-value < 0.01.

# Keep lower threshold avg_log2FC for checking DE genes in all clusters
de.markers.list.025 <- lapply(LNGList, function(se) {
  se <- SetIdent(se, value = "seurat_clusters")
  FindAllMarkers(se, only.pos = TRUE, logfc.threshold = 0.25)
})
de.markers.list.025 <- lapply(de.markers.list.025, function(de.markers) {
  de.markers %>% dplyr::filter(p_val_adj < 0.01)
})

# avg_log2FC > 0.5 
# These are the DE genes used for figure plots
de.markers.list <- lapply(de.markers.list.025, function(de.markers) {
  de.markers %>% dplyr::filter(avg_log2FC > 0.5)
})

Add cluster annotations


# RRST cluster annotations
ann1 <- c("0" = "AT1-enriched", "1" = "Macrophage-enriched",
         "2" = "AT2-enriched", "3" = "Connective tissue 1", 
         "4" = "Connective tissue 2", "5" = "Connective tissue 3",
         "6" = "Airway epithelium", "7" = "Megakaryocyte-enriched",
         "8" = "Smooth muscle", "9" = "Immune-enriched", 
         "10" = "Glands")
ann3 <- c("0" = "AT2-enriched", "1" = "Low-quality cluster 1",
          "2" = "Connective tissue 1", "3" = "Connective tissue 2",
          "4" = "Low-quality cluster 2", "5" = "Connective tissue 3",
          "6" = "Glands", "7" = "Megakaryocyte-enriched", 
          "8" = "Airway epithelium")

Create plots for figure 2


  • plots_vln : violin plots showing the number of unique genes and UMIs
  • plots_filter : spatial plots showing what spots are discarded in the filtering step (unique genes < 300)
  • plots_umap : UMAP plots colored by cluster
  • plots_qc : spatial plots showing the number of unique genes
  • plots_HE : HE images
  • plots_spatial : spatial plots showing clusters, split by panel
  • plots_dotplot : dot plot showing DE genes per cluster
# Violin plots showing the number of unique genes and UMIs
plots_vln <- lapply(1:4, function(i) {
  p <- LNGList[[i]][[]] %>%
    dplyr::mutate(`Unique genes` = nFeature_RNA, `UMI counts` = nCount_RNA) %>%
    reshape2::melt(measure.vars = c("Unique genes", "UMI counts")) %>%
    ggplot(aes(paper_id, value, fill = variable)) +
    geom_violin(scale = "width", alpha = 0.7) +
    geom_boxplot(width = 0.3) +
    theme_classic() +
    facet_wrap(~variable, scales = "free") +
    theme(axis.title = element_blank(), axis.text.x = element_blank(), axis.ticks.x = element_blank(), 
          legend.position = "none", axis.text.y = element_text(size = 18, colour = "black"), 
          strip.text = element_text(size = 18))
  return(p)
})

# Spatial plots showing the spots discarded
plots_filter <- lapply(c("RNA_rescue_ID:_LNG1", "standard_ID:_LNG1", "RNA_rescue_ID:_LNG1", "standard_ID:_LNG1"), function(i) {
  p <- ST.FeaturePlot(SubsetSTData(LNG, expression = protocol_lng %in% i), features = "filter", show.sb = FALSE, pt.size = 1.3, 
                 cols = c("keep" = "lightgray", "discard" = "red"), indices = ifelse(i %in% c("standard_ID:_1.0", "standard_ID:_2.0"), 2, 1)) &
    theme(strip.text = element_blank(), plot.title = element_blank(), legend.title = element_blank(), legend.text = element_text(size = 16)) &
  guides(fill = guide_legend(override.aes = list(size = 7)))
  p <- ggrastr::rasterize(p, layers = "Point", dpi = 300)
  return(p)
})

# UMAP plots showing clusters
plots_umap <- lapply(1:4, function(i) {
  gg <- cbind(LNGList[[i]][[]], LNGList[[i]]@reductions$umap@cell.embeddings)

  p <- ggplot() +
    geom_point(data = gg, aes(UMAP_1, UMAP_2, color = seurat_clusters)) +
    ggrepel::geom_label_repel(size = 9, label.size = 0.2, data = gg %>% 
                 dplyr::group_by(seurat_clusters) %>% 
                 summarize(med1 = median(UMAP_1), med2 = median(UMAP_2)), aes(med1, med2 + 0.6, fill = seurat_clusters, label = seurat_clusters)) +
    theme_classic() +
    theme(plot.title = element_blank(), 
          legend.position = "none", axis.text = element_text(size = 14, colour = "black"), axis.title = element_text(size = 18))
  p <- ggrastr::rasterize(p, layers = "Point", dpi = 300)
  return(p)
})

# Spatial plots showing the number of unique genes
plots_qc <- lapply(1:4, function(i) {
  p <- ST.FeaturePlot(LNGList[[i]], features = "nFeature_RNA", show.sb = FALSE, pt.size = 1.3, 
                      indices = ifelse(i %in% c(2, 4), 2, 1), cols = viridis::magma(n = 11, direction = -1)) &
    theme(plot.subtitle = element_blank(), 
          plot.title = element_blank(), 
          strip.text = element_blank(), 
          legend.text = element_text(size = 14), 
          legend.title = element_text(size = 18)) &
    labs(fill = "Unique\ngenes") 
  p <- ggrastr::rasterize(p, layers = "Point", dpi = 300)
  return(p)
})

# HE images
plots_HE <- lapply(1:4, function(i) {
  im <- GetStaffli(LNGList[[i]])@rasterlists$processed[[ifelse(i %in% c(2, 4), 2, 1)]]
  im[, 1:100] <- "#ffffffff"; im[, (ncol(im) - 120):ncol(im)] <- "#ffffffff"
  im <- im[101:(nrow(im) - 100), ]
  g <- grid::rasterGrob(im, width = unit(1, "npc"), height = unit(1, "npc"), interpolate = TRUE)
  ggplot() +
    annotation_custom(g, -Inf, Inf, -Inf, Inf) +
    theme_void() +
    theme(plot.margin = margin(t = 0, r = 40, b = 0, l = 40))
})

# Spatial plots showing clusters split by clusters
plots_spatial <- lapply(1:4, function(i) {
  p <- ST.FeaturePlot(LNGList[[i]], features = "seurat_clusters", split.labels = TRUE, ncol = ifelse(i %in% c(1, 2), 4, 3), 
                 indices = ifelse(i %in% c(2, 4), 2, 1), show.sb = FALSE, pt.size = 0.5) +
    theme(plot.title = element_blank(), legend.position = "none", strip.text = element_blank()) &
    scale_x_continuous(limits = c(150, 1850)) &
    scale_y_continuous(limits = c(150, 1850))
  p <- ggrastr::rasterize(p, layers = "Point", dpi = 300)
  return(p)
})
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
# Dot plot showing DE genes
plots_dotplot <- lapply(1:4, function(i) {
  LNG <- LNGList[[i]]
  if (i == 1) {
    LNG$seurat_clusters <- factor(ann1[LNG$seurat_clusters], levels = ann1)
  }
  if (i == 2) {
    LNG$seurat_clusters <- factor(ann3[LNG$seurat_clusters], levels = ann3)
  }
  LNG <- Seurat::SetIdent(LNG, value = "seurat_clusters")
  p <- DotPlot(LNG, features = unique(de.markers.list[[i]] %>% 
                                          dplyr::mutate(gene_count = table(gene)[gene]) %>%
                                          dplyr::filter(gene_count == 1) %>%
                                          dplyr::group_by(cluster) %>%
                                          dplyr::slice_head(n = 4) %>% 
                                          dplyr::pull(gene) %>% rev())) +
    scale_color_gradientn(colours = scico::scico(n = 11, palette = "bam", direction = -1)) +
    scale_y_discrete(position = "left") +
    theme(axis.title = element_blank(), axis.text = element_text(size = 14), legend.text = element_text(size = 14), 
          legend.title = element_text(size = 14), axis.text.x = element_text(angle = 60, hjust = 1, size = 16)) +
    coord_flip()
  p$guides$colour$title <- "Avg. Expr."
  p$guides$size$title <- "Pct. Expr."
  return(p)
})
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.
## Scale for 'colour' is already present. Adding another scale for 'colour',
## which will replace the existing scale.

Patchwork for Figure 2


This patchwork includes only LNG1 and each plot type is places side by side for a simple comparison between the two protocols.

# Design for patchwork
design <- c(
  patchwork::area(1, 1, 1, 1),
  patchwork::area(1, 2, 1, 2),
  patchwork::area(2, 1, 2, 1),
  patchwork::area(2, 2, 2, 2),
  patchwork::area(3, 1, 3, 1),
  patchwork::area(4, 1, 4, 1),
  patchwork::area(3, 2, 3, 2),
  patchwork::area(4, 2, 4, 2),
  
  patchwork::area(1, 3, 1, 3),
  patchwork::area(1, 4, 1, 4),
  patchwork::area(2, 3, 2, 3),
  patchwork::area(2, 4, 2, 4),
  patchwork::area(3, 3, 5, 3),
  patchwork::area(3, 4, 5, 4)
)

# Create patchwork
p <- plots_HE[[1]] +
  plots_HE[[2]] +
  plots_qc[[1]] +
  plots_qc[[2]] +
  plots_umap[[1]] + 
  plots_spatial[[1]] +
  plots_umap[[2]] +
  plots_spatial[[2]] +
  plots_vln[[1]] +
  plots_vln[[2]] +
  plots_filter[[1]] +
  plots_filter[[2]] +
  plots_dotplot[[1]] +
  plots_dotplot[[2]] +
  patchwork::plot_layout(design = design, heights = c(1.5, 2, 2, 2, 0.5))

p

# Export patchwork as pdf
pdf(file = "plots/figure_2_patchwork_side_by_side.pdf", width = 26, height = 20)
print(p)
dev.off()

Patchwork for Supplementary Figure - LNG2 analysis results


This patchwork includes only LNG2 and each plot type is places side by side for a simple comparison between the two protocols.

# Design for patchwork
design <- c(
  patchwork::area(1, 1, 1, 1),
  patchwork::area(1, 2, 1, 2),
  patchwork::area(2, 1, 2, 1),
  patchwork::area(2, 2, 2, 2),
  patchwork::area(3, 1, 3, 1),
  patchwork::area(4, 1, 4, 1),
  patchwork::area(3, 2, 3, 2),
  patchwork::area(4, 2, 4, 2),
  
  patchwork::area(1, 3, 1, 3),
  patchwork::area(1, 4, 1, 4),
  patchwork::area(2, 3, 2, 3),
  patchwork::area(2, 4, 2, 4),
  patchwork::area(3, 3, 5, 3),
  patchwork::area(3, 4, 5, 4)
)

# Create patchwork
p <- plots_HE[[3]] +
  plots_HE[[4]] +
  plots_qc[[3]] +
  plots_qc[[4]] +
  plots_umap[[3]] + 
  plots_spatial[[3]] +
  plots_umap[[4]] +
  plots_spatial[[4]] +
  plots_vln[[3]] +
  plots_vln[[4]] +
  plots_filter[[3]] +
  plots_filter[[4]] +
  plots_dotplot[[3]] +
  plots_dotplot[[4]] +
  patchwork::plot_layout(design = design, heights = c(1.5, 2, 2, 2, 0.5))

p

pdf(file = "../Suppl_figures/Suppl_Figure_lung_LNG2_analysis/suppl_figure_lung_LNG2_patchwork.pdf", width = 26, height = 20)
print(p)
dev.off()

date


date()
## [1] "Thu Aug 25 10:32:18 2022"

Session


devtools::session_info()
## ─ Session info ───────────────────────────────────────────────────────────────
##  setting  value
##  version  R version 4.1.3 (2022-03-10)
##  os       macOS Big Sur/Monterey 10.16
##  system   x86_64, darwin13.4.0
##  ui       unknown
##  language (EN)
##  collate  en_US.UTF-8
##  ctype    en_US.UTF-8
##  tz       Europe/Stockholm
##  date     2022-08-25
##  pandoc   2.18 @ /Applications/RStudio.app/Contents/MacOS/quarto/bin/tools/ (via rmarkdown)
## 
## ─ Packages ───────────────────────────────────────────────────────────────────
##  package         * version date (UTC) lib source
##  abind             1.4-5   2016-07-21 [1] CRAN (R 4.1.0)
##  assertthat        0.2.1   2019-03-21 [1] CRAN (R 4.1.0)
##  backports         1.4.1   2021-12-13 [1] CRAN (R 4.1.1)
##  beeswarm          0.4.0   2021-06-01 [1] CRAN (R 4.1.0)
##  bit               4.0.4   2020-08-04 [1] CRAN (R 4.1.0)
##  bit64             4.0.5   2020-08-30 [1] CRAN (R 4.1.0)
##  bmp               0.3     2017-09-11 [1] CRAN (R 4.1.3)
##  brio              1.1.3   2021-11-30 [1] CRAN (R 4.1.1)
##  broom             0.8.0   2022-04-13 [1] CRAN (R 4.1.3)
##  bslib             0.3.1   2021-10-06 [1] CRAN (R 4.1.1)
##  cachem            1.0.6   2021-08-19 [1] CRAN (R 4.1.1)
##  Cairo             1.5-15  2022-03-16 [1] CRAN (R 4.1.2)
##  callr             3.7.0   2021-04-20 [1] CRAN (R 4.1.0)
##  car               3.0-13  2022-05-02 [1] CRAN (R 4.1.3)
##  carData           3.0-5   2022-01-06 [1] CRAN (R 4.1.2)
##  cli               3.2.0   2022-02-14 [1] CRAN (R 4.1.2)
##  cluster           2.1.3   2022-03-28 [1] CRAN (R 4.1.2)
##  codetools         0.2-18  2020-11-04 [1] CRAN (R 4.1.0)
##  colorspace        2.0-3   2022-02-21 [1] CRAN (R 4.1.2)
##  cowplot           1.1.1   2020-12-30 [1] CRAN (R 4.1.0)
##  crayon            1.5.1   2022-03-26 [1] CRAN (R 4.1.2)
##  data.table        1.14.2  2021-09-27 [1] CRAN (R 4.1.1)
##  DBI               1.1.2   2021-12-20 [1] CRAN (R 4.1.2)
##  deldir            1.0-6   2021-10-23 [1] CRAN (R 4.1.1)
##  desc              1.4.1   2022-03-06 [1] CRAN (R 4.1.2)
##  devtools          2.4.3   2021-11-30 [1] CRAN (R 4.1.1)
##  digest            0.6.29  2021-12-01 [1] CRAN (R 4.1.1)
##  dplyr           * 1.0.8   2022-02-08 [1] CRAN (R 4.1.2)
##  ellipsis          0.3.2   2021-04-29 [1] CRAN (R 4.1.0)
##  evaluate          0.15    2022-02-18 [1] CRAN (R 4.1.2)
##  fansi             1.0.3   2022-03-24 [1] CRAN (R 4.1.2)
##  farver            2.1.0   2021-02-28 [1] CRAN (R 4.1.0)
##  fastmap           1.1.0   2021-01-25 [1] CRAN (R 4.1.0)
##  fitdistrplus      1.1-8   2022-03-10 [1] CRAN (R 4.1.3)
##  fs                1.5.2   2021-12-08 [1] CRAN (R 4.1.3)
##  future            1.24.0  2022-02-19 [1] CRAN (R 4.1.2)
##  future.apply      1.8.1   2021-08-10 [1] CRAN (R 4.1.1)
##  generics          0.1.2   2022-01-31 [1] CRAN (R 4.1.2)
##  ggbeeswarm        0.6.0   2017-08-07 [1] CRAN (R 4.1.0)
##  ggplot2         * 3.3.5   2021-06-25 [1] CRAN (R 4.1.0)
##  ggpubr          * 0.4.0   2020-06-27 [1] CRAN (R 4.1.0)
##  ggrastr           1.0.1   2021-12-08 [1] CRAN (R 4.1.1)
##  ggrepel           0.9.1   2021-01-15 [1] CRAN (R 4.1.0)
##  ggridges          0.5.3   2021-01-08 [1] CRAN (R 4.1.3)
##  ggsignif          0.6.3   2021-09-09 [1] CRAN (R 4.1.1)
##  globals           0.14.0  2020-11-22 [1] CRAN (R 4.1.0)
##  glue              1.6.2   2022-02-24 [1] CRAN (R 4.1.2)
##  goftest           1.2-3   2021-10-07 [1] CRAN (R 4.1.3)
##  gridExtra         2.3     2017-09-09 [1] CRAN (R 4.1.3)
##  gtable            0.3.0   2019-03-25 [1] CRAN (R 4.1.0)
##  hdf5r             1.3.5   2021-11-15 [1] CRAN (R 4.1.1)
##  highr             0.9     2021-04-16 [1] CRAN (R 4.1.0)
##  htmltools         0.5.2   2021-08-25 [1] CRAN (R 4.1.1)
##  htmlwidgets       1.5.4   2021-09-08 [1] CRAN (R 4.1.1)
##  httpuv            1.6.5   2022-01-05 [1] CRAN (R 4.1.2)
##  httr              1.4.2   2020-07-20 [1] CRAN (R 4.1.0)
##  ica               1.0-2   2018-05-24 [1] CRAN (R 4.1.3)
##  igraph            1.3.0   2022-04-01 [1] CRAN (R 4.1.3)
##  imager            0.42.13 2022-03-07 [1] CRAN (R 4.1.3)
##  irlba             2.3.5   2021-12-06 [1] CRAN (R 4.1.3)
##  jpeg              0.1-9   2021-07-24 [1] CRAN (R 4.1.3)
##  jquerylib         0.1.4   2021-04-26 [1] CRAN (R 4.1.0)
##  jsonlite          1.8.0   2022-02-22 [1] CRAN (R 4.1.2)
##  KernSmooth        2.23-20 2021-05-03 [1] CRAN (R 4.1.0)
##  knitr             1.38    2022-03-25 [1] CRAN (R 4.1.2)
##  labeling          0.4.2   2020-10-20 [1] CRAN (R 4.1.2)
##  later             1.3.0   2021-08-18 [1] CRAN (R 4.1.3)
##  lattice           0.20-45 2021-09-22 [1] CRAN (R 4.1.1)
##  lazyeval          0.2.2   2019-03-15 [1] CRAN (R 4.1.0)
##  leiden            0.3.9   2021-07-27 [1] CRAN (R 4.1.3)
##  lifecycle         1.0.1   2021-09-24 [1] CRAN (R 4.1.1)
##  listenv           0.8.0   2019-12-05 [1] CRAN (R 4.1.0)
##  lmtest            0.9-40  2022-03-21 [1] CRAN (R 4.1.3)
##  magick            2.7.3   2021-08-18 [1] CRAN (R 4.1.3)
##  magrittr        * 2.0.3   2022-03-30 [1] CRAN (R 4.1.3)
##  MASS              7.3-56  2022-03-23 [1] CRAN (R 4.1.2)
##  Matrix            1.4-1   2022-03-23 [1] CRAN (R 4.1.2)
##  matrixStats       0.62.0  2022-04-19 [1] CRAN (R 4.1.3)
##  memoise           2.0.1   2021-11-26 [1] CRAN (R 4.1.1)
##  mgcv              1.8-40  2022-03-29 [1] CRAN (R 4.1.3)
##  mime              0.12    2021-09-28 [1] CRAN (R 4.1.1)
##  miniUI            0.1.1.1 2018-05-18 [1] CRAN (R 4.1.0)
##  munsell           0.5.0   2018-06-12 [1] CRAN (R 4.1.2)
##  nlme              3.1-157 2022-03-25 [1] CRAN (R 4.1.2)
##  openxlsx          4.2.5   2021-12-14 [1] CRAN (R 4.1.3)
##  parallelly        1.31.0  2022-04-07 [1] CRAN (R 4.1.3)
##  patchwork         1.1.1   2020-12-17 [1] CRAN (R 4.1.3)
##  pbapply           1.5-0   2021-09-16 [1] CRAN (R 4.1.3)
##  pillar            1.7.0   2022-02-01 [1] CRAN (R 4.1.2)
##  pkgbuild          1.3.1   2021-12-20 [1] CRAN (R 4.1.2)
##  pkgconfig         2.0.3   2019-09-22 [1] CRAN (R 4.1.0)
##  pkgload           1.2.4   2021-11-30 [1] CRAN (R 4.1.1)
##  plotly            4.10.0  2021-10-09 [1] CRAN (R 4.1.3)
##  plyr              1.8.7   2022-03-24 [1] CRAN (R 4.1.2)
##  png               0.1-7   2013-12-03 [1] CRAN (R 4.1.0)
##  polyclip          1.10-0  2019-03-14 [1] CRAN (R 4.1.3)
##  prettyunits       1.1.1   2020-01-24 [1] CRAN (R 4.1.0)
##  processx          3.5.3   2022-03-25 [1] CRAN (R 4.1.2)
##  promises          1.2.0.1 2021-02-11 [1] CRAN (R 4.1.0)
##  ps                1.6.0   2021-02-28 [1] CRAN (R 4.1.0)
##  purrr             0.3.4   2020-04-17 [1] CRAN (R 4.1.0)
##  R6                2.5.1   2021-08-19 [1] CRAN (R 4.1.1)
##  RANN              2.6.1   2019-01-08 [1] CRAN (R 4.1.3)
##  raster            3.5-15  2022-01-22 [1] CRAN (R 4.1.2)
##  RColorBrewer      1.1-3   2022-04-03 [1] CRAN (R 4.1.3)
##  Rcpp              1.0.8.3 2022-03-17 [1] CRAN (R 4.1.2)
##  RcppAnnoy         0.0.19  2021-07-30 [1] CRAN (R 4.1.3)
##  readbitmap        0.1.5   2018-06-27 [1] CRAN (R 4.1.3)
##  remotes           2.4.2   2021-11-30 [1] CRAN (R 4.1.1)
##  reshape2          1.4.4   2020-04-09 [1] CRAN (R 4.1.0)
##  reticulate        1.24    2022-01-26 [1] CRAN (R 4.1.3)
##  rlang             1.0.2   2022-03-04 [1] CRAN (R 4.1.2)
##  rmarkdown         2.13    2022-03-10 [1] CRAN (R 4.1.2)
##  ROCR              1.0-11  2020-05-02 [1] CRAN (R 4.1.3)
##  rpart             4.1.16  2022-01-24 [1] CRAN (R 4.1.2)
##  rprojroot         2.0.3   2022-04-02 [1] CRAN (R 4.1.3)
##  rstatix           0.7.0   2021-02-13 [1] CRAN (R 4.1.0)
##  rstudioapi        0.13    2020-11-12 [1] CRAN (R 4.1.0)
##  Rtsne             0.16    2022-04-17 [1] CRAN (R 4.1.3)
##  sass              0.4.1   2022-03-23 [1] CRAN (R 4.1.2)
##  scales            1.2.0   2022-04-13 [1] CRAN (R 4.1.3)
##  scattermore       0.8     2022-02-14 [1] CRAN (R 4.1.3)
##  scico             1.3.0   2021-12-08 [1] CRAN (R 4.1.3)
##  sctransform       0.3.3   2022-01-13 [1] CRAN (R 4.1.3)
##  sessioninfo       1.2.2   2021-12-06 [1] CRAN (R 4.1.1)
##  Seurat          * 4.1.0   2022-01-14 [1] CRAN (R 4.1.3)
##  SeuratObject    * 4.0.4   2021-11-23 [1] CRAN (R 4.1.3)
##  shiny             1.7.1   2021-10-02 [1] CRAN (R 4.1.1)
##  shinyjs           2.1.0   2021-12-23 [1] CRAN (R 4.1.3)
##  sp                1.4-6   2021-11-14 [1] CRAN (R 4.1.1)
##  spatstat.core     2.4-2   2022-04-01 [1] CRAN (R 4.1.3)
##  spatstat.data     2.2-0   2022-04-18 [1] CRAN (R 4.1.3)
##  spatstat.geom     2.4-0   2022-03-29 [1] CRAN (R 4.1.3)
##  spatstat.random   2.2-0   2022-03-30 [1] CRAN (R 4.1.3)
##  spatstat.sparse   2.1-1   2022-04-18 [1] CRAN (R 4.1.3)
##  spatstat.utils    2.3-0   2021-12-12 [1] CRAN (R 4.1.3)
##  stringi           1.7.6   2021-11-29 [1] CRAN (R 4.1.1)
##  stringr           1.4.0   2019-02-10 [1] CRAN (R 4.1.0)
##  STutility       * 0.1.0   2022-05-19 [1] local
##  survival          3.3-1   2022-03-03 [1] CRAN (R 4.1.2)
##  tensor            1.5     2012-05-05 [1] CRAN (R 4.1.3)
##  terra             1.5-21  2022-02-17 [1] CRAN (R 4.1.2)
##  testthat          3.1.3   2022-03-29 [1] CRAN (R 4.1.3)
##  tibble            3.1.6   2021-11-07 [1] CRAN (R 4.1.1)
##  tidyr             1.2.0   2022-02-01 [1] CRAN (R 4.1.2)
##  tidyselect        1.1.2   2022-02-21 [1] CRAN (R 4.1.2)
##  tiff              0.1-11  2022-01-31 [1] CRAN (R 4.1.3)
##  usethis           2.1.5   2021-12-09 [1] CRAN (R 4.1.1)
##  utf8              1.2.2   2021-07-24 [1] CRAN (R 4.1.0)
##  uwot              0.1.11  2021-12-02 [1] CRAN (R 4.1.3)
##  vctrs             0.4.1   2022-04-13 [1] CRAN (R 4.1.3)
##  vipor             0.4.5   2017-03-22 [1] CRAN (R 4.1.0)
##  viridis           0.6.2   2021-10-13 [1] CRAN (R 4.1.3)
##  viridisLite       0.4.0   2021-04-13 [1] CRAN (R 4.1.0)
##  withr             2.5.0   2022-03-03 [1] CRAN (R 4.1.2)
##  xfun              0.30    2022-03-02 [1] CRAN (R 4.1.2)
##  xtable            1.8-4   2019-04-21 [1] CRAN (R 4.1.0)
##  yaml              2.3.5   2022-02-21 [1] CRAN (R 4.1.2)
##  zeallot           0.1.0   2018-01-28 [1] CRAN (R 4.1.3)
##  zip               2.2.0   2021-05-31 [1] CRAN (R 4.1.0)
##  zoo               1.8-10  2022-04-15 [1] CRAN (R 4.1.3)
## 
##  [1] /Users/ludviglarsson/anaconda3/envs/R4.1/lib/R/library
## 
## ──────────────────────────────────────────────────────────────────────────────